<?php
/* 
 * akimimi front
 * 
 * order Service
 * 
 * @author 
 * 
 */
require_once '../app/core/services/BaseService.php';
require_once '../app/models/AreaDictDao.php';
require_once '../app/models/CampusDao.php';

class AreaService extends BaseService {
	private $areaDictDao;
	private $campusDao;
	
    public function __construct(){
		parent::__construct();
		
		$this->areaDictDao = new AreaDictDao($this->dbUtil);
		$this->campusDao = new CampusDao($this->dbUtil);
	}
	
	public function save($area){
		$this->areaDictDao->save($area);
	}
	
	public function getAreaDicts($params){
		return $this->areaDictDao->getAreaDicts($params);
	}
	
    public function getAreaById($id){
		return $this->areaDictDao->getAreaById($id);
	}
	
	public function saveCampus($campus){
		$this->campusDao->save($campus);
	}
	
	public function getAllProvince(){
		return $this->areaDictDao->getAllProvince();
	}
	
    public function getCampusByDictId($areaDictId,$showInOrder = 1){
        return $this->campusDao->getCampusByDictId($areaDictId,$showInOrder);
    }
    
	
}